Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

Additions to devbox definitions#18

Merged
raffertyuy merged 7 commits intomicrosoft:mainfrom
arnaudlh:pr-17
Jun 18, 2025
Merged

Additions to devbox definitions#18
raffertyuy merged 7 commits intomicrosoft:mainfrom
arnaudlh:pr-17

Conversation

@arnaudlh
Copy link
Copy Markdown
Collaborator

This pull request introduces enhancements to the Dev Center modules and examples, focusing on improved configuration flexibility, updated dependencies, and refined resource handling. Key changes include support for advanced SKU configurations, addition of new properties like osStorageType, and updates to provider versions.

Enhancements to Dev Box Definitions:

  • Simplified hibernate_support property to use a boolean instead of nested objects for easier configuration. [1] [2]
  • Added support for os_storage_type property to specify the storage type for the operating system disk. [1] [2]
  • Introduced advanced SKU object configuration, allowing detailed customization of SKU properties such as tier, capacity, and family. [1] [2]

Updates to Modules:

  • Changed resource_type values in azurecaf_name resources to align with Azure-specific types (e.g., azurerm_dev_center, azurerm_dev_center_catalog). [1] [2] [3]
  • Added lifecycle ignore_changes for system-managed tags in the dev_center module to handle Azure-added tags gracefully.

Provider Version Upgrades:

  • Upgraded azurecaf provider version from ~> 1.2.0 to ~> 1.2.29 across all modules for compatibility and feature improvements. [1] [2] [3] [4]

Validation Enhancements:

  • Added validation rules for sku object fields, ensuring proper configuration and preventing invalid values (e.g., tier must be one of "Free", "Basic", "Standard", "Premium"). [1] [2]
  • Introduced validation for os_storage_type to enforce a specific pattern (e.g., ssd_256gb).

Output Improvements:

  • Added new outputs for os_storage_type, image_validation_status, and other validation-related properties to provide better insight into the configuration and status of Dev Box Definitions.

arnaudlh added 6 commits June 16, 2025 19:41
- Upgrade azurecaf provider version to 1.2.29.
- Enhance SKU configuration to support both simple name and full object.
- Introduce os_storage_type variable for OS disk configuration.
- Simplify hibernate_support to a boolean value.
- Enable schema validation for azapi resource.
- Add new outputs for image validation status and details.
- Create comprehensive unit tests for Dev Box Definition module.
- Update README with test coverage and instructions.
@arnaudlh arnaudlh requested review from Copilot and raffertyuy and removed request for raffertyuy June 17, 2025 06:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances Dev Center Dev Box Definitions by adding flexible SKU configurations, introducing an os_storage_type property, simplifying hibernate_support, and updating provider versions and tests.

  • Support for both simple sku_name and structured sku object with validations
  • Added optional os_storage_type with pattern enforcement
  • Simplified hibernate_support to a boolean and updated tests accordingly
  • Upgraded azurecaf provider across modules and added lifecycle ignores for system tags

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
variables.tf Updated dev_center_dev_box_definitions variable to support new fields and validations
modules/dev_center_dev_box_definition/variables.tf Added sku object, os_storage_type, simplified hibernate_support, and validations
modules/dev_center_dev_box_definition/module.tf Built sku_object, merged new fields into resource body, enabled schema validation
modules/dev_center_dev_box_definition/output.tf Added outputs for os_storage_type, validation status, and image details
tests/unit/dev_center_dev_box_definition/devbox_definition_test.tftest.hcl Expanded tests for new fields: storage type, advanced SKU, multiple definitions
tests/unit/dev_center_dev_box_definition/README.md Documented the new test scenarios
tests/run_tests.sh Included the new test directory in the unit test run list
provider.tf, modules//module.tf, modules//README.md Upgraded azurecaf provider version and adjusted resource_type values
Comments suppressed due to low confidence (3)

modules/dev_center_dev_box_definition/variables.tf:110

  • Add a negative unit test for invalid os_storage_type values (e.g., "hdd_100gb") to ensure the new validation block rejects unsupported patterns.
validation {

modules/dev_center_dev_box_definition/variables.tf:74

  • Consider adding tests for invalid SKU configurations (missing name, unsupported tier, or non-positive capacity) to verify each validation rule.
validation {

variables.tf:79

  • [nitpick] Removing the TFLint ignore may surface unused declaration warnings; if variables remain intentionally declared but unused, consider updating or reintroducing the directive.
-# tflint-ignore: terraform_unused_declarations

Comment on lines +96 to +102
local.sku_object != null ? {
sku = local.sku_object
} : var.dev_box_definition.sku_name != null ? {
sku = {
name = var.dev_box_definition.sku_name
}
},
} : {},
Copy link

Copilot AI Jun 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Wrap the nested ternary (?:) expressions in parentheses for the SKU block to improve readability and avoid ambiguity.

Copilot uses AI. Check for mistakes.
@arnaudlh arnaudlh self-assigned this Jun 17, 2025
@raffertyuy raffertyuy merged commit 12c9b5c into microsoft:main Jun 18, 2025
16 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants